package cn.gok.springboot.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @ClassName Teacher
 * @Description TODO
 * @Author HP
 * @Date 10:53 2022/7/14
 * @Version 1.0
 **/
@Component("teacher")
//注册到Spring容器
@Data
@NoArgsConstructor //无参够着
@AllArgsConstructor //有参
@ConfigurationProperties(prefix="teacher")
public class Teacher {
    private int age;
    private String name;
}
